import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/styles/reset.less';
import '@/styles/base.less';
import '@/styles/mixin.less';
// import '@/assets/iconfont/iconfont.css';
// import '@/assets/iconfont/iconfont';
import router from '@/router';
import store from '@/store';
import installPlugins from '@/plugins';
import App from './App';
import '@/mixins';

// 插件注入
Vue.use(installPlugins);
Vue.use(ElementUI, { size: 'small', zIndex: 4096 });
Vue.config.devtools = process.env.NODE_ENV !== 'production';

try {
  if (process.env.VUE_APP_API_MOCK && process.env.NODE_ENV !== 'production') {
    require('../mock');
  }
} catch (e) {
  console.error(('Mock: ', e));
}

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
});
